#pragma once

#include "potocol.h"
#include <winsock2.h>
#pragma comment(lib,"wsock32.lib")

class CNet
{
public:
	CNet(void);
	virtual ~CNet(void);

public:
	BOOL	Init(char* pszIp, WORD wPort);

public:
	BOOL	SendMsg(stMsgHead* stMsg);
	BOOL	RecvMsg();

private:
	BOOL	DealRecvMsg(stMsgHead* stMsg, int nLen);

public:
	int		m_nSocket;
	char	m_szMsg[1024*10];
	char	m_szSndMsg[1024];

private:
	int		m_nUserId;

};
